<html>
<head>
    <title>Welcome to Sparkle Motion</title>
    <link href="css/styles.css" rel="stylesheet" type="text/css" />
</head>

<body>
    <div style="width: 400px; margin-left: auto; margin-right: auto; margin-top: 40px;">
        <div class="login_box">
            <div>
                    <script type="text/javascript">
                        function submitform(){
                            document.forms["loginForm"].submit();
	                    }   
                    </script>
                        
                    <form id="loginForm" name="login_Form" method="post" action="loginExec">
                        <?php
                        //If there were errors logging in... they display here
                            if( isset($_SESSION['ERRMSG_ARR']) && is_array($_SESSION['ERRMSG_ARR']) && count($_SESSION['ERRMSG_ARR']) >0 ) {
                                echo '<ul class="err">';
                                foreach($_SESSION['ERRMSG_ARR'] as $msg) {
                                    echo '<li>',$msg,'</li>';
                                }
                                echo '</ul>';
                                unset($_SESSION['ERRMSG_ARR']);
                            }
                        ?>
                        
                        <table>
                            <tr><td>Username</td><td><input name="login" type="text" class="textfield" id="login" /></td></tr>
                            <tr><td>Password</td><td><input name="password" type="password" class="textfield" id="password" /></td></tr>
                            <tr><td></td><td><input class="buttonInput" type="submit" value="Login" /></td></tr>
                        </table>      
                    </form>    
            </div>
        </div>
    </div>
            
</body>
</html>
